import { UserLayout, BasicLayout, RouteView } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

export const asyncRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/humanResources/report/compositeEcharts',
    children: [
      {
        path: '/humanResources/report',
        name: 'humanResourcesReportCode',
        component: RouteView,
        meta: { title: '数据统计', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesReport' ] },
        children: [
          {
            path: '/humanResources/report/compositeEcharts',
            name: 'humanResourcesReportCompositeEchartsCode',
            component: () => import('@/humanResources/report/compositeEcharts'),
            meta: { title: '月度综合统计', keepAlive: true, permission: [ 'humanResourcesReport' ] }
          },
          {
            path: '/humanResources/report/compositeDetailEcharts',
            name: 'humanResourcesReportCompositeDetailEchartsCode',
            component: () => import('@/humanResources/report/compositeDetailEcharts'),
            meta: { title: '月度明细统计', keepAlive: true, permission: [ 'humanResourcesReport' ] }
          },
          {
            path: '/humanResources/report/cityEcharts',
            name: 'humanResourcesReportCityEchartsCode',
            component: () => import('@/humanResources/report/cityEcharts'),
            meta: { title: '月度城市统计', keepAlive: true, permission: [ 'humanResourcesReport' ] }
          },
          {
            path: '/humanResources/report/yearCompositeEcharts',
            name: 'humanResourcesReportYearCompositeEchartsCode',
            component: () => import('@/humanResources/report/yearCompositeEcharts'),
            meta: { title: '年度综合统计', keepAlive: true, permission: [ 'humanResourcesReport' ] }
          }
        ]
      },
      {
        path: '/workplace',
        name: 'workplaceCode',
        component: () => import('@/views/Home'),
        meta: { title: '数据分析', keepAlive: true, icon: 'home' }
      },
      {
        path: '/permission',
        name: 'permissionCode',
        redirect: '/permission/role',
        component: RouteView,
        meta: { title: '平台管理', keepAlive: true, icon: bxAnaalyse, permission: [ 'permission' ] },
        children: [
          {
            path: '/permission/role',
            name: 'permissionRoleCode',
            component: () => import('@/views/permission/role'),
            meta: { title: '角色管理', keepAlive: true, permission: [ 'permission' ] }
          },
          {
            path: '/permission/childmenu',
            name: 'permissionChildmenuCode',
            component: () => import('@/views/permission/childmenu'),
            meta: { title: '账号菜单管理', keepAlive: true, permission: [ 'permission' ] }
          },
          {
            path: '/permission/parentmenu',
            name: 'permissionParentmenuCode',
            component: () => import('@/views/permission/parentmenu'),
            meta: { title: '权限配置', keepAlive: true, permission: [ 'permission' ] }
          },
          {
            path: '/humanResources/department',
            name: 'humanResourcesDepartmentCode',
            component: () => import('@/humanResources/department/department_list'),
            meta: { title: '内部组织架构', keepAlive: true, permission: [ 'humanResources' ] }
          },
          {
            path: '/humanResources/personnel/gardener',
            name: 'humanResourcesPersonnelGardenerCode',
            component: () => import('@/humanResources/personnel/gardener_list'),
            meta: { title: '员工权限', keepAlive: true, permission: [ 'umanResourcesPersonnel' ] }
          },
          {
            path: '/humanResources/park',
            name: 'humanResourcesParkCode',
            component: () => import('@/humanResources/park/park_list'),
            meta: { title: '平台公司', keepAlive: true, permission: [ 'humanResourcesPark' ] }
          },
          
        ]
      },
      {
        path: '/policy',
        name: 'policyCode',
        redirect: '/policy/policy_list',
        component: RouteView,
        meta: { title: '政策库', keepAlive: true, icon: bxAnaalyse, permission: [ 'policy' ] },
        children: [
          {
            path: '/humanResources/policy',
            name: 'humanResourcesPolicyCode',
            component: () => import('@/humanResources/policy/policy_list'),
            meta: { title: '政策库配置', keepAlive: true, permission: [ 'humanResourcesPolicy' ] }
          },
          {
            path: '/humanResources/policy/policyDetail',
            name: 'humanResourcesPolicyDetailCode',
            component: () => import('@/humanResources/policy/policy_detail'),
            meta: { title: '政策库详情', keepAlive: true, permission: [ 'humanResourcesPolicy' ] }
          },
          {
            path: '/humanResources/scale',
            name: 'humanResourcesPolicyScaleCode',
            component: () => import('@/humanResources/policy/scale_list'),
            meta: { title: '社保比例查询', keepAlive: true, permission: [ 'humanResourcesPolicy' ] }
          },
          {
            path: '/humanResources/scaleConfig',
            name: 'humanResourcesPolicyScaleConfigCode',
            component: () => import('@/humanResources/policy/scale_config'),
            meta: { title: '社保比例配置', keepAlive: true, permission: [ 'humanResourcesPolicy' ] }
          }
        ]
      },
      {
        path: '/humanResources/personnel',
        name: 'humanResourcesCanalCode',
        component: RouteView,
        meta: { title: '合作渠道', keepAlive: true, icon: bxAnaalyse, permission: [ 'umanResourcesPersonnel' ] },
        children: [
          {
            path: '/humanResources/personnel/canal',
            name: 'humanResourcesPersonnelCanalCode',
            component: () => import('@/humanResources/personnel/canal_list'),
            meta: { title: '渠道列表', keepAlive: true, permission: [ 'umanResourcesPersonnel' ] }
          },
          {
            path: '/humanResources/personnel/canalCustom',
            name: 'humanResourcesPersonnelCanalCustomCode',
            component: () => import('@/humanResources/personnel/canalCustom_list'),
            meta: { title: '渠道客户管理', keepAlive: true, permission: [ 'umanResourcesPersonnel' ] }
          },
        ]
      },
      {
        path: '/humanResources/personnelFall',
        name: 'humanResourcesFallCode',
        component: RouteView,
        meta: { title: '落地服务商', keepAlive: true, icon: bxAnaalyse, permission: [ 'umanResourcesPersonnelFall' ] },
        children: [
          {
            path: '/humanResources/personnelFall/fall',
            name: 'humanResourcesPersonnelFallCode',
            component: () => import('@/humanResources/personnelFall/fall_list'),
            meta: { title: '服务商列表', keepAlive: true, permission: [ 'umanResourcesPersonnelFall' ] }
          },
          {
            path: '/humanResources/personnelFall/fallCustom',
            name: 'humanResourcesPersonnelFallCustomCode',
            component: () => import('@/humanResources/personnelFall/fallCustom_list'),
            meta: { title: '落地客户管理', keepAlive: true, permission: [ 'umanResourcesPersonnelFall' ] }
          },
        ]
      },
      // {
      //   path: '/humanResources/park',
      //   name: 'humanResourcesParkCode',
      //   component: RouteView,
      //   meta: { title: '平台配置管理', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesPark' ] },
      //   children: [
      //     {
      //       path: '/humanResources/park',
      //       name: 'humanResourcesParkCode',
      //       component: () => import('@/humanResources/park/park_list'),
      //       meta: { title: '平台公司', keepAlive: true, permission: [ 'humanResourcesPark' ] }
      //     },
      //     {
      //       path: '/humanResources/policy',
      //       name: 'humanResourcesPolicyCode',
      //       component: () => import('@/humanResources/park/policy_list'),
      //       meta: { title: '政策库配置', keepAlive: true, permission: [ 'humanResourcesPark' ] }
      //     },
          
      //   ]
      // },
      // {
      //   path: '/humanResources/enterpriseConfig',
      //   name: 'humanResourcesEnterpriseConfigCode',
      //   component: RouteView,
      //   meta: { title: '企业配置', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesEnterpriseConfig' ] },
      //   children: [
      //     {
      //       path: '/humanResources/enterpriseConfig/form',
      //       name: 'humanResourcesEnterpriseConfigFormCode',
      //       component: () => import('@/humanResources/enterpriseConfig/form_list'),
      //       meta: { title: '动态字段配置', keepAlive: true, permission: [ 'humanResourcesEnterpriseConfig' ] }
      //     }
      //   ]
      // },
      {
        path: '/humanResources/enterprise',
        name: 'humanResourcesEnterpriseCode',
        component: RouteView,
        meta: { title: '企业客户', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesEnterprise' ] },
        children: [
          {
            path: '/humanResources/enterprise',
            name: 'humanResourcesEnterpriseCode',
            component: () => import('@/humanResources/enterprise/enterprise_list'),
            meta: { title: '客户列表', keepAlive: true, permission: [ 'humanResourcesEnterprise' ] }
          },
          {
            path: '/humanResources/openAccount',
            name: 'humanResourcesEnterpriseOpenAccountCode',
            component: () => import('@/humanResources/enterprise/openAccount_list'),
            meta: { title: '企业/园区开户', keepAlive: true, permission: [ 'humanResourcesEnterprise' ] }
          },
          {
            path: '/humanResources/relation/org',
            name: 'humanResourcesRelationOrgCode',
            component: () => import('@/humanResources/relation/org_list'),
            meta: { title: '客户组织', keepAlive: true, permission: [ 'humanResourcesRelation' ] }
          },
          {
            path: '/humanResources/enterpriseConfig/form',
            name: 'humanResourcesEnterpriseConfigFormCode',
            component: () => import('@/humanResources/enterpriseConfig/form_list'),
            meta: { title: '自定义', keepAlive: true, permission: [ 'humanResourcesEnterpriseConfig' ] }
          }
        ]
      },
      {
        path: '/humanResources/relation',
        name: 'humanResourcesRelationCode',
        component: RouteView,
        meta: { title: '员工管理', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesRelation' ] },
        children: [
          {
            path: '/humanResources/relation/staff',
            name: 'humanResourcesRelationStaffCode',
            component: () => import('@/humanResources/relation/staff_list'),
            meta: { title: '员工花名册', keepAlive: true, permission: [ 'humanResourcesRelation' ] }
          },
          {
            path: '/humanResources/relation/staffInfo',
            name: 'humanResourcesRelationStaffInfoCode',
            component: () => import('@/humanResources/relation/staff_info'),
            meta: { title: '员工个人信息', keepAlive: true, permission: [ 'humanResourcesRelationStaff' ] }
          },
          {
            path: '/humanResources/relation/induction',
            name: 'humanResourcesRelationInductionCode',
            component: () => import('@/humanResources/relation/induction_list'),
            meta: { title: '人员入职', keepAlive: true, permission: [ 'humanResourcesRelation' ] }
          },
          {
            path: '/humanResources/relation/quit',
            name: 'humanResourcesRelationQuitCode',
            component: () => import('@/humanResources/relation/quit_list'),
            meta: { title: '人员离职', keepAlive: true, permission: [ 'humanResourcesRelation' ] }
          },
          {
            path: '/humanResources/relation/transfer',
            name: 'humanResourcesRelationTransferCode',
            component: () => import('@/humanResources/relation/transfer_list'),
            meta: { title: '职工调转', keepAlive: true, permission: [ 'humanResourcesRelation' ] }
          },
        ]
      },
      {
        path: '/humanResources/salaryPay',
        name: 'humanResourcesSalaryPayCode',
        component: RouteView,
        meta: { title: '薪酬代发', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesSalaryPay' ] },
        children: [
          {
            path: '/humanResources/salaryPay/staff',
            name: 'humanResourcesStaffCode',
            component: () => import('@/humanResources/salaryPay/staff'),
            meta: { title: '员工账户', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
          {
            path: '/humanResources/salaryPay/sendSalary',
            name: 'humanResourcesSendSalaryCode',
            component: () => import('@/humanResources/salaryPay/sendSalary'),
            meta: { title: '发薪订单', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
          {
            path: '/humanResources/salaryPay/sendSalaryDetail',
            name: 'humanResourcesSendSalaryDetailCode',
            component: () => import('@/humanResources/salaryPay/sendSalaryDetail'),
            meta: { title: '发薪明细', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
          {
            path: '/humanResources/salaryPay/sendSalaryImportDetail',
            name: 'humanResourcesSendSalaryImportDetailCode',
            component: () => import('@/humanResources/salaryPay/sendSalaryImportDetail'),
            meta: { title: '发薪导入明细', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
          {
            path: '/humanResources/salaryPay/sendSalaryPay',
            name: 'humanResourcesSendSalaryPayCode',
            component: () => import('@/humanResources/salaryPay/sendSalaryPay'),
            meta: { title: '补缴费用', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
          {
            path: '/humanResources/salaryPay/sendSalaryBill',
            name: 'humanResourcesSendSalaryBillCode',
            component: () => import('@/humanResources/salaryPay/sendSalaryBill'),
            meta: { title: '发薪账单', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
          {
            path: '/humanResources/salaryPay/servriceGet',
            name: 'humanResourcesServriceGetCode',
            component: () => import('@/humanResources/salaryPay/servriceGet'),
            meta: { title: '服务费补收', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
          {
            path: '/humanResources/salaryPay/specialAdd',
            name: 'humanResourcesSpecialAddCode',
            component: () => import('@/humanResources/salaryPay/specialAdd'),
            meta: { title: '专项附加', keepAlive: true, permission: [ 'humanResourcesSalaryPay' ] }
          },
        ]
      },
      {
        path: '/humanResources/ensure',
        name: 'humanResourcesEnsureCode',
        component: RouteView,
        meta: { title: '社保商保', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesEnsure' ] },
        children: [
          {
            path: '/humanResources/ensure/publicPlan',
            name: 'humanResourcesEnsurePublicPlanCode',
            component: () => import('@/humanResources/ensure/publicPlan'),
            meta: { title: '社保公积金方案', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/publicPlanHandle',
            name: 'humanResourcesEnsurePublicPlanHandleCode',
            component: () => import('@/humanResources/ensure/publicPlanHandle'),
            meta: { title: '社保公积金方案', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/joinStaff',
            name: 'humanResourcesEnsureJoinStaffCode',
            component: () => import('@/humanResources/ensure/joinStaff'),
            meta: { title: '参保人员管理', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/payOrder',
            name: 'humanResourcesEnsurePayOrderCode',
            component: () => import('@/humanResources/ensure/payOrder'),
            meta: { title: '社保缴交订单', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/payOrderDetail',
            name: 'humanResourcesEnsurePayOrderDetailCode',
            component: () => import('@/humanResources/ensure/payOrderDetail'),
            meta: { title: '缴交订单详情', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/ensureOrder',
            name: 'humanResourcesEnsureEnsureOrderCode',
            component: () => import('@/humanResources/ensure/ensureOrder'),
            meta: { title: '社保公积金账单', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/ensureOrderReturn',
            name: 'humanResourcesEnsureEnsureOrderReturnCode',
            component: () => import('@/humanResources/ensure/ensureOrderReturn'),
            meta: { title: '社保退缴账单', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/businessOrder',
            name: 'humanResourcesEnsureBusinessOrderCode',
            component: () => import('@/humanResources/ensure/businessOrder'),
            meta: { title: '商保管理', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
          {
            path: '/humanResources/ensure/businessOrderEnterprise',
            name: 'humanResourcesEnsureBusinessOrderEnterpriseCode',
            component: () => import('@/humanResources/ensure/businessOrderEnterprise'),
            meta: { title: '商保管理-企业', keepAlive: true, permission: [ 'humanResourcesEnsure' ] }
          },
        ]
      },
      {
        path: '/humanResources/finance',
        name: 'humanResourcesFinanceCode',
        component: RouteView,
        meta: { title: '发票管理', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesFinance' ] },
        children: [
          {
            path: '/humanResources/finance/invoiceApply',
            name: 'humanResourcesInvoiceApplyCode',
            component: () => import('@/humanResources/finance/invoiceApply'),
            meta: { title: '发票申请', keepAlive: true, permission: [ 'humanResourcesFinance' ] }
          },
          {
            path: '/humanResources/finance/invoiceHead',
            name: 'humanResourcesInvoiceHeadCode',
            component: () => import('@/humanResources/finance/invoiceHead'),
            meta: { title: '抬头管理', keepAlive: true, permission: [ 'humanResourcesFinance' ] }
          },
          {
            path: '/humanResources/finance/invoiceExamine',
            name: 'humanResourcesInvoiceExamineCode',
            component: () => import('@/humanResources/finance/invoiceExamine'),
            meta: { title: '发票审核', keepAlive: true, permission: [ 'humanResourcesFinance' ] }
          },
          {
            path: '/humanResources/finance/invoiceExamineDetail',
            name: 'humanResourcesInvoiceExamineDetailCode',
            component: () => import('@/humanResources/finance/invoiceExamineDetail'),
            meta: { title: '发票审核详情', keepAlive: true, permission: [ 'humanResourcesFinance' ] }
          },
        ]
      },
      {
        path: '/humanResources/disabled',
        name: 'humanResourcesDisabledCode',
        component: RouteView,
        meta: { title: '残疾人业务', keepAlive: true, icon: bxAnaalyse, permission: [ 'humanResourcesDisabled' ] },
        children: [
          {
            path: '/humanResources/disabled/overviewEcharts',
            name: 'humanResourcesOverviewEchartsCode',
            component: () => import('@/humanResources/disabled/overviewEcharts'),
            meta: { title: '总览', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/statisticsEcharts',
            name: 'humanResourcesStatisticsEchartsCode',
            component: () => import('@/humanResources/disabled/statisticsEcharts'),
            meta: { title: '统计', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/workConfirm',
            name: 'humanResourcesWorkConfirmCode',
            component: () => import('@/humanResources/disabled/workConfirm_list'),
            meta: { title: '工作内容确认', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/attendance',
            name: 'humanResourcesAttendanceCode',
            component: () => import('@/humanResources/disabled/attendance_list'),
            meta: { title: '考勤管理', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/information',
            name: 'humanResourcesInformationCode',
            component: () => import('@/humanResources/disabled/information_list'),
            meta: { title: '人员信息管理', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/skillsTraining',
            name: 'humanResourcesSkillsTrainingCode',
            component: () => import('@/humanResources/disabled/skillsTraining_list'),
            meta: { title: '技能培训记录', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/staffCare',
            name: 'humanResourcesStaffCareCode',
            component: () => import('@/humanResources/disabled/staffCare_list'),
            meta: { title: '员工关怀记录', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/publicize',
            name: 'humanResourcesPublicizeCode',
            component: () => import('@/humanResources/disabled/publicize_list'),
            meta: { title: '企业宣传记录', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          },
          {
            path: '/humanResources/disabled/complianceTask',
            name: 'humanResourcesComplianceTaskCode',
            component: () => import('@/humanResources/disabled/complianceTask_list'),
            meta: { title: '达标任务', keepAlive: true, permission: [ 'humanResourcesDisabled' ] }
          }
        ]
      },
    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

export const otherRoutersMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/humanResources/report/compositeEcharts',
    children: [
      // {
      //   path: '/application',
      //   name: 'applicationCode',
      //   component: RouteView,
      //   meta: { title: '应用中心', keepAlive: true, icon: bxAnaalyse, permission: ['application'] },
      //   children: [
      //     {
      //       path: '/application/taskDetail',
      //       name: 'applicationTaskDetailCode',
      //       component: () => import('@/views/application/task/task_detail'),
      //       meta: { title: '任务详情', keepAlive: true, permission: ['application'] }
      //     },
      //     {
      //       path: '/application/settleDetail',
      //       name: 'applicationSettleDetailCode',
      //       component: () => import('@/views/application/settlebill/settle_bill_detail'),
      //       meta: { title: '结算详情', keepAlive: true, permission: ['application'] }
      //     }
      //   ]
      // }
    ]
  }
]

export const constantRouterMap = [
  {
    path: '/login',
    name: 'loginCode',
    component: UserLayout,
    redirect: '/login',
    hidden: true,
    children: [
      {
        path: '/login',
        name: 'loginCode',
        component: () => import('@/views/Login')
      },
    ]
  },
  {
    path: '/404',
    component: () => import('@/views/404')
  },
   {
     path: '/error',
     name: 'errorCode',
    component: () => import('@/views/error')
  }
]
